package com.demo.dynamicproxy;

public class ProxyTest {

    public static void main(String[] args) {
        System.out.println("不适用代理类调用 doSomething");
        Person person = new Bob();
        person.doSomething();
        System.out.println("======================");

        System.out.println("使用代理类使用doSomething");

        Person target = (Person)new JDKDynamicProxy(new Bob()).getTarget();
        target.doSomething();
    }
}
